package com.sz.mes.vo.warehouse;

import com.diboot.core.binding.annotation.*;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.sz.mes.entity.Instock;
import com.sz.mes.entity.Outbound;
import com.sz.mes.entity.warehouse.LatticeGoods;
import com.sz.mes.entity.Goods;
import com.sz.mes.entity.warehouse.Lattice;
import com.diboot.iam.entity.IamUser;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.util.List;

/**
 * 货格对应商品表 DetailVO定义
 *
 * @author hem
 * @version 1.0
 * @date 2023-05-25
 * Copyright © szhs
 */
@Getter
@Setter
@Accessors(chain = true)
public class LatticeGoodsDetailVO extends LatticeGoods {

    private static final long serialVersionUID = 155902503670356897L;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.create_by=id")
    private String createByName;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.update_by=id")
    private String updateByName;

    /**
     * 关联字段 商品.商品编码：Goods.goodsCode
     */
    @BindField(entity = Goods.class, field = "goodsCode", condition = "this.goods_code=goods_code")
    private String goodsCode;

    /**
     * 关联字段 商品.商品名称：Goods.goodsName
     */
    @BindField(entity = Goods.class, field = "goodsName", condition = "this.goods_name=goods_name")
    private String goodsName;

    @BindQuery(entity = Instock.class, condition = "this.instock_num=acceptance_num")
    private String instockNum;

    @BindQuery(entity = Outbound.class, condition = "this.outbound_num=outbound_num")
    private String outboundNum;
}
